package com.kitbox.hl.meshow.framenwork.listener.entity;

import org.camunda.bpm.engine.impl.core.model.CoreModelElement;
import org.camunda.bpm.engine.impl.pvm.runtime.ActivityInstanceState;
import org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl;

/**
 * @Auther: honglei
 * @Date: 2019/8/20 09:42
 * @Description:
 */
public class MyDelegateExecution {
    protected boolean shouldQueryForSubprocessInstance = false;
    protected boolean shouldQueryForSubCaseInstance = false;
    protected int cachedEntityState;
    protected int revision = 1;
    protected String processDefinitionId;
    protected String activityId;
    protected String activityName;
    protected String processInstanceId;
    protected String parentId;
    protected String superExecutionId;
    protected String rootProcessInstanceId;
    protected String superCaseExecutionId;

    protected String activityInstanceId;
    protected String caseInstanceId;
    protected PvmExecutionImpl replacedBy;
    protected boolean deleteRoot;
    protected String deleteReason;
    protected boolean externallyTerminated;
    protected boolean isActive = true;
    protected boolean isScope = true;
    protected boolean isConcurrent = false;
    protected boolean isEnded = false;
    protected boolean isEventScope = false;
    protected boolean preserveScope = false;
    protected int activityInstanceState = ActivityInstanceState.DEFAULT.getStateCode();
    protected long sequenceCounter = 0;


    protected String id;
    protected String businessKey;
    protected String businessKeyWithoutCascade;
    protected String tenantId;
    protected String eventName;
    protected transient CoreModelElement eventSource;
    protected MyCoreModelElement myCoreModelElement;
    protected int listenerIndex = 0;
    protected boolean skipCustomListeners;
    protected boolean skipIoMapping;
    protected boolean skipSubprocesses;


    public MyDelegateExecution() {
    }


    public boolean isShouldQueryForSubprocessInstance() {
        return shouldQueryForSubprocessInstance;
    }

    public void setShouldQueryForSubprocessInstance(boolean shouldQueryForSubprocessInstance) {
        this.shouldQueryForSubprocessInstance = shouldQueryForSubprocessInstance;
    }

    public boolean isShouldQueryForSubCaseInstance() {
        return shouldQueryForSubCaseInstance;
    }

    public void setShouldQueryForSubCaseInstance(boolean shouldQueryForSubCaseInstance) {
        this.shouldQueryForSubCaseInstance = shouldQueryForSubCaseInstance;
    }

    public int getCachedEntityState() {
        return cachedEntityState;
    }

    public void setCachedEntityState(int cachedEntityState) {
        this.cachedEntityState = cachedEntityState;
    }

    public int getRevision() {
        return revision;
    }

    public void setRevision(int revision) {
        this.revision = revision;
    }

    public String getProcessDefinitionId() {
        return processDefinitionId;
    }

    public void setProcessDefinitionId(String processDefinitionId) {
        this.processDefinitionId = processDefinitionId;
    }

    public String getActivityId() {
        return activityId;
    }

    public void setActivityId(String activityId) {
        this.activityId = activityId;
    }

    public String getActivityName() {
        return activityName;
    }

    public void setActivityName(String activityName) {
        this.activityName = activityName;
    }

    public String getProcessInstanceId() {
        return processInstanceId;
    }

    public void setProcessInstanceId(String processInstanceId) {
        this.processInstanceId = processInstanceId;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getSuperExecutionId() {
        return superExecutionId;
    }

    public void setSuperExecutionId(String superExecutionId) {
        this.superExecutionId = superExecutionId;
    }

    public String getRootProcessInstanceId() {
        return rootProcessInstanceId;
    }

    public void setRootProcessInstanceId(String rootProcessInstanceId) {
        this.rootProcessInstanceId = rootProcessInstanceId;
    }

    public String getSuperCaseExecutionId() {
        return superCaseExecutionId;
    }

    public void setSuperCaseExecutionId(String superCaseExecutionId) {
        this.superCaseExecutionId = superCaseExecutionId;
    }

    public String getActivityInstanceId() {
        return activityInstanceId;
    }

    public void setActivityInstanceId(String activityInstanceId) {
        this.activityInstanceId = activityInstanceId;
    }

    public String getCaseInstanceId() {
        return caseInstanceId;
    }

    public void setCaseInstanceId(String caseInstanceId) {
        this.caseInstanceId = caseInstanceId;
    }

    public PvmExecutionImpl getReplacedBy() {
        return replacedBy;
    }

    public void setReplacedBy(PvmExecutionImpl replacedBy) {
        this.replacedBy = replacedBy;
    }

    public boolean isDeleteRoot() {
        return deleteRoot;
    }

    public void setDeleteRoot(boolean deleteRoot) {
        this.deleteRoot = deleteRoot;
    }

    public String getDeleteReason() {
        return deleteReason;
    }

    public void setDeleteReason(String deleteReason) {
        this.deleteReason = deleteReason;
    }

    public boolean isExternallyTerminated() {
        return externallyTerminated;
    }

    public void setExternallyTerminated(boolean externallyTerminated) {
        this.externallyTerminated = externallyTerminated;
    }

    public boolean isActive() {
        return isActive;
    }

    public void setActive(boolean active) {
        isActive = active;
    }

    public boolean isScope() {
        return isScope;
    }

    public void setScope(boolean scope) {
        isScope = scope;
    }

    public boolean isConcurrent() {
        return isConcurrent;
    }

    public void setConcurrent(boolean concurrent) {
        isConcurrent = concurrent;
    }

    public boolean isEnded() {
        return isEnded;
    }

    public void setEnded(boolean ended) {
        isEnded = ended;
    }

    public boolean isEventScope() {
        return isEventScope;
    }

    public void setEventScope(boolean eventScope) {
        isEventScope = eventScope;
    }

    public boolean isPreserveScope() {
        return preserveScope;
    }

    public void setPreserveScope(boolean preserveScope) {
        this.preserveScope = preserveScope;
    }

    public int getActivityInstanceState() {
        return activityInstanceState;
    }

    public void setActivityInstanceState(int activityInstanceState) {
        this.activityInstanceState = activityInstanceState;
    }

    public long getSequenceCounter() {
        return sequenceCounter;
    }

    public void setSequenceCounter(long sequenceCounter) {
        this.sequenceCounter = sequenceCounter;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getBusinessKey() {
        return businessKey;
    }

    public void setBusinessKey(String businessKey) {
        this.businessKey = businessKey;
    }

    public String getBusinessKeyWithoutCascade() {
        return businessKeyWithoutCascade;
    }

    public void setBusinessKeyWithoutCascade(String businessKeyWithoutCascade) {
        this.businessKeyWithoutCascade = businessKeyWithoutCascade;
    }

    public String getTenantId() {
        return tenantId;
    }

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    public String getEventName() {
        return eventName;
    }

    public void setEventName(String eventName) {
        this.eventName = eventName;
    }



    public int getListenerIndex() {
        return listenerIndex;
    }

    public void setListenerIndex(int listenerIndex) {
        this.listenerIndex = listenerIndex;
    }

    public boolean isSkipCustomListeners() {
        return skipCustomListeners;
    }

    public void setSkipCustomListeners(boolean skipCustomListeners) {
        this.skipCustomListeners = skipCustomListeners;
    }

    public boolean isSkipIoMapping() {
        return skipIoMapping;
    }

    public void setSkipIoMapping(boolean skipIoMapping) {
        this.skipIoMapping = skipIoMapping;
    }

    public boolean isSkipSubprocesses() {
        return skipSubprocesses;
    }

    public void setSkipSubprocesses(boolean skipSubprocesses) {
        this.skipSubprocesses = skipSubprocesses;
    }


    public CoreModelElement getEventSource() {
        return eventSource;
    }

    public void setEventSource(CoreModelElement eventSource) {
        this.eventSource = eventSource;
    }

    public MyCoreModelElement getMyCoreModelElement() {
        return myCoreModelElement;
    }

    public void setMyCoreModelElement(MyCoreModelElement myCoreModelElement) {
        this.myCoreModelElement = myCoreModelElement;
        this.eventSource=null;
    }
}
